﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using mesoBoard.Services;
using System.Web.Mvc;
using System.IO;
using mesoBoard.Common.UrlHelpers;

namespace mesoBoard.Web.HtmlHelpers
{
    public static class Links
    {
        public static string GetBBCodeScriptUrl(this UrlHelper url)
        {
            string defaultUrl = url.ThemeContent("~/Content/Scripts/bbcode-set-parsed.js");

            if (!File.Exists(defaultUrl))
                Misc.ParseBBCodeScriptFile();

            return defaultUrl;
        }
    }
}